<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>WIKINDX CLASS DOCUMENTATION</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="/wikindx2/docs/docs.css" type="text/css" />
</head>

<body bgcolor="#FFFFFF" text="#000000">
<h2>WIKINDX METHODS</h2>
<p><strong>Method:</strong><br />
  
  checkExists()
</p>
<p><strong>Class:</strong><br />

  <a href="collectionClass.html">COLLECTION</a>
<p><strong>Method Call:</strong><br />
include_once("core/collection/COLLECTION.php");<br />
$collection = new COLLECTION($this-&gt;db);<br />
INT $creator->checkExists(STRING: $title, STRING: $shortTitle, STRING: $collectionType); </p>
<p><strong>Description:</strong><br />
  Prior to inserting or updating a collection, this method should be called to check whether the new collection already exists in the <em>WKX_collection</em> table. If it does not, FALSE is returned; if it does, the collection ID is returned ready for insertion into the <em>WKX_resource_misc</em> table. The match is case-insensitive. Because <em>$collectionType</em> is used in the match, it is quite feasible for two collections with the same <em>$title</em> (even the same <em>$shortTitle</em>) but with a different <em>$collectionType</em> to exist in the <em>WKX_collection</em> table. For valid collection types, see <em>core/collection/COLLECTIONMAP.php</em>.
<p><strong>Usage:</strong>
<pre>
	$collection = new COLLECTION($this->db);
	$id = $collection->checkExists("Journal of Useless Knowledge", FALSE, "journal");
</pre>
<p align="right"><a href="../../index.html">WIKINDX home</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="../../usage/index.html">WIKINDX usage</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="../index.html">WIKINDX classes</a>
</p>
</body>

</html>
